Fix components test and remove added padding/margin on tabs - #7841
Merged
Merged
Conversation
James Newton-King (JamesNK)
requested review from
Adam Ratzman (adamint),
Copilot and
Mitch Denny (mitchdenny)
March 1, 2025 06:06
Contributor
There was a problem hiding this comment.
PR Overview
This PR addresses a flaky test issue and removes undesired added padding/margin on FluentUI tabs by introducing an explicit wait and overriding the default tab size.
- Removes the ActiveIssue attribute and adds a wait for the clear menu element in the ConsoleLogsTests.
- Overrides the default FluentTabs size in Resources.razor and ChartContainer.razor using a custom cast value.
Reviewed Changes
| File | Description |
|---|---|
| tests/Aspire.Dashboard.Components.Tests/Pages/ConsoleLogsTests.cs | Removed flaky test marker and added explicit wait for element |
| src/Aspire.Dashboard/Components/Pages/Resources.razor | Updated FluentTabs to remove undesired padding/margin via custom Size attribute |
| src/Aspire.Dashboard/Components/Controls/Chart/ChartContainer.razor | Updated FluentTabs with the same Size override to fix layout issues |
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
src/Aspire.Dashboard/Components/Pages/Resources.razor:105
- [nitpick] The use of '(TabSize)int.MinValue' is not self-explanatory; consider defining a named constant or adding a comment to clarify its purpose for removing added padding/margin.
<FluentTabs Class="resources-tab-header" ActiveTabId="@($"tab-{PageViewModel.SelectedViewKind}")" OnTabChange="@OnTabChangeAsync" Size="(TabSize)int.MinValue">
src/Aspire.Dashboard/Components/Controls/Chart/ChartContainer.razor:33
- [nitpick] The custom cast to '(TabSize)int.MinValue' should be documented or replaced with a clearly named constant to maintain clarity and ease of maintenance.
<FluentTabs ActiveTabId="@($"tab-{ActiveView}")" OnTabChange="@OnTabChangeAsync" Size="(TabSize)int.MinValue">
David Fowler (davidfowl)
approved these changes
Mar 3, 2025
James Newton-King (JamesNK)
enabled auto-merge (squash)
March 3, 2025 01:29
Mitch Denny (mitchdenny)
approved these changes
Mar 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7839
a custom valuenull.